package sketch.issta11.specifyoracles;

import org.eclipse.jdt.core.dom.CompilationUnit;

import sketch.ast.ASTUtils;
import sketch.main.GeneratingTests;
import sketch.specs.SketchTestProcessor;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class ObserverOraclesTest extends TestCase {
	
	public static Test suite() {
		return new TestSuite(ObserverOraclesTest.class);
	}
	
	public void testTransformOracles() {
		String filePath = "./tests/sketch/issta11/specifyoracles/Z_ObserverOracles_Example.java";
		SketchTestProcessor sketchProcessor = new SketchTestProcessor(filePath);
		CompilationUnit unit = sketchProcessor.getProcessedCompilationUnit();
		System.out.println(unit);
		assertEquals(8, ASTUtils.getAllMethods(unit).size());
		//GeneratingTests.release = true;
		GeneratingTests.genSymbolicValuesToOutputTests(unit, "./tests/sketch/issta11/autogenerated",
				sketchProcessor.getFileNameWithoutSuffix(), "sketch.issta11.autogenerated", null, null, null);
	}
	
}